import psutil


def 结束进程():
    PROC_NAME = "WINWORD.EXE"

    for proc in psutil.process_iter():
        # check whether the process to kill name matches
        if proc.name() == PROC_NAME:
            proc.kill()




